#include<iostream>
#include<string>
using namespace std;
typedef long long LL;
const int N = 2e5 + 10;
int arr[N];
LL s[N];
int n, q;
int main()
{
	int t;
	scanf("%d", &t);
	while (t--) {
		scanf("%d%d", &n, &q);
		for (int i = 1; i <= n; i++)scanf("%d",&arr[i]), s[i] = s[i - 1] + 1ll * arr[i];
		while (q--) {
			LL l, r, k;
			scanf("%lld%lld%lld", &l, &r, &k);
			LL ans1 = (r - l + 1) * k * 1ll;
			LL ans2 = s[r] - s[l - 1];
			if ((s[n] - ans2 + ans1) % 2 == 1)printf("YES\n");
			else printf("NO\n");
		}
	}
	return 0;
}